home *** CD-ROM | disk | FTP | other *** search
/ Scene Storm / Scene Storm - Volume 1.iso / coding / c / amiexpress / source / ae / code / ax3.00 / setprotocol.c < prev    next >
Encoding:
C/C++ Source or Header  |  1980-01-03  |  748 b   |  52 lines

  1. #include "bbs.h"
  2.  
  3.  
  4. void SetProtocol(char *str)
  5. {
  6. // int status;
  7.  
  8.  /* added this till we add protocols (RTS) */
  9.  User.Protocol = 'Z';
  10.  return;
  11. #ifdef RTS_NOPROTOCOLS
  12. if(str[0]=='\0')
  13.     {
  14.     ListProtocols();
  15.     }
  16. for(;;)
  17.     {
  18.     if(str[0]=='\0')
  19.         {
  20.           sprintf(str,"\r\nProtocol: (Enter)= %c? ",User.Protocol);
  21.         AEPutStr(str);
  22.         str[0]='\0';
  23.         status=LineInput("",str,1,KEYBOARD_TIMEOUT);
  24.         if(status<0) { return; }
  25.         }
  26.     if(strlen(str)!=0)
  27.         {
  28.         strupr(str);
  29.         switch(str[0])
  30.             {
  31.             case 'Z':
  32. //            case 'X':
  33.                 AEPutStr("\r\n");
  34.                 User.Protocol=(UBYTE)str[0];
  35.                 return;
  36.                 break;
  37.             default:
  38.                 str[0]='\0';
  39.                 AEPutStr("\r\nInvalid protocol select another\r\n");
  40.                 ListProtocols();
  41.                 break;
  42.             }
  43.         }
  44.     else
  45.         {
  46.         return;
  47.         }
  48.     }
  49. #endif
  50. }
  51.  
  52.